package gameEngine.agents.teamMateModel;

import gameEngine.agents.Agent;

import java.util.ArrayList;

import org.apache.log4j.Logger;
/**
 * Initialize all but self with 0 competence
 */
public class Init0Model extends InitTeamMateModel{

	Logger log=Logger.getLogger(this.getClass());
	
	public Init0Model(int myId) {
		super(myId);
	}
	
	@Override
	public void init(ArrayList<Agent> realAgents) {
		//set all agents competence to 0
		log.debug("Initialize teamMateModel with 0");
		for(Agent a:realAgents){
			if(a.getID()!=myId){
				AgentMockImpl mock=new AgentMockImpl(0, 0, a.getID());
				agents.put(a.getID(),mock );
			}else{
				AgentMockImpl mock=new AgentMockImpl(a.getCompetence(), a.getEpsilonGreedy(), a.getID());
				agents.put(a.getID(),mock );		
			}
		}
	}

}
